﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="CapGCN.ascx.vb" Inherits="Control_QuanLyHoSo_CapGCN" %>
<%@ Register Assembly="CuteEditor" Namespace="CuteEditor" TagPrefix="CE" %>
<%@ Register Assembly="ValidationTextBox" Namespace="ValidationTextBox.CustomControls"
    TagPrefix="cc1" %>
<%@ Register Assembly="ValidationDropdownlist" Namespace="ValidationDropdownlist.CustomControls"
    TagPrefix="cc2" %>
<script type="text/javascript">
    $(function () {
        $(".Date").datepicker({ dateFormat: 'dd/mm/yy' });
    });
    function SetDownFile(aURL) {
        document.getElementById('expFile').src = aURL;
        return false;
    }
    function confirmMultiDelete(strID) {
        var grdShow = document.getElementById("<%=grdShow.ClientID %>");
        var count = 0;
        for (i = 1; i < grdShow.children.item(0).children.length; i++) {
            if (grdShow.children.item(0).children.item(i).children.item(0).children.item(0).checked) {
                count += 1;
            }
        }
        if (count > 0) {
            return ComfirmDialog('<%=drpMessage.Items(1).Text%>', 0, strID, 0, 0);
        } else {
            Alertbox('<%=drpMessage.Items(2).Text%>');
            return false;
        }
    }
    function ComfirmDialog(strText, value, ObjectIdClick, txtCertifiedUp_Time, ID, Type) {

        if (value == 0) {
            Confirmbox(strText, value, ObjectIdClick, txtCertifiedUp_Time, ID, Type);
            return false;
        } else {
            if (Type == 1) {
                document.getElementById('<%=IdCer.ClientID %>').value = ID;

                eval($("#" + ObjectIdClick + "").attr("href"));
            }
            else {
                $("#" + ObjectIdClick + "").click();
            }
        }
    }

</script>
<asp:UpdatePanel ID="uspQLEditCapMoi" runat="server">
    <ContentTemplate>
        <div class="content_porletform">
            <div class="HeadTitle">
                <h3>CẤP GIẤY CHỨNG NHẬN ĐĂNG KÝ HỘ KINH DOANH
                </h3>
            </div>
            <div class="box_contentform">
                <div class="box_scroll_grid" style="margin-bottom: 0px">
                    <div class="DivRow">
                        <div class="Div-Left">
                            <div class="DivLabelSearch">
                                Số GCN:
                            </div>
                            <div class="DivTextBox">
                                <asp:TextBox ID="txtCertifiedCode" CssClass="TextBox" runat="server" Text="" />
                            </div>
                        </div>
                        <div class="Div-Right">
                        </div>
                    </div>
                    <div class="DivRow" id="cerDateBegin" runat="server" style="display:none">
                        <div class="Div-Left">
                            <div class="DivLabelSearch">
                                Ngày cấp lần đầu:
                            </div>
                            <div class="DivTextBox">
                                <asp:TextBox ID="txtCertifiedDateBegin" CssClass="TextBox Date" runat="server" Text="" />
                                <asp:Button ID="btnUpdateCertifiedDate" runat="server" Text="Sửa" CssClass="btn btn-info" />
                            </div>

                        </div>
                        <div class="Div-Right">
                        </div>
                    </div>
                    <div style="height: 10px;">
                    </div>
                    <div class="DivRow">
                        <div class="Div-Left">
                            <div class="DivLabelSearch">
                                Ngày cấp:
                            </div>
                            <div class="DivTextBox">
                                <asp:TextBox ID="txtCertifiedDate" CssClass="TextBox Date" runat="server" Text="" />
                            </div>
                        </div>
                        <div class="Div-Right">
                        </div>
                    </div>
                    <div style="height: 10px;">
                    </div>
                    <div class="content_porletform" id="List" runat="server">
                        <div class="HeadTitle">
                            <h3 class="text-center">BỘ HỒ SƠ BAO GỒM
                            </h3>
                        </div>
                        <%--thong tin chung--%>
                        <div class="box_contentform">
                            <div class="box_scroll_grid">
                                <%--thong tin chung--%>
                                <div class="panel-group margin-detail">
                                    <div class="panel-body">
                                        <asp:GridView ID="grdShow" runat="server" AutoGenerateColumns="False" EmptyDataText="{Không có dữ liệu}"
                                            AllowPaging="false" Width='100%' BorderWidth="1px" CssClass="GridBorder">
                                            <Columns>
                                                <asp:TemplateField HeaderText="STT">
                                                    <ItemTemplate>
                                                        <asp:Label runat="server" ID="lblSTT" Text=''></asp:Label>
                                                    </ItemTemplate>
                                                    <ItemStyle Width="5%" HorizontalAlign="Left" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Giấy chứng nhận">
                                                    <ItemTemplate>
                                                        <asp:HyperLink ID="hplParentId" runat="server" Target="_blank"></asp:HyperLink>
                                                        <asp:TextBox ID="txtCertifiedUp_Timegrd" runat="server" Style="width: 10px" CssClass="TextBox"></asp:TextBox>
                                                    </ItemTemplate>
                                                    <ItemStyle Width='10%' />
                                                </asp:TemplateField>
                                                <asp:BoundField DataField='CertifiedCode' HeaderText='Giấy CN'>
                                                    <ItemStyle Width='10%' />
                                                </asp:BoundField>
                                                <asp:TemplateField HeaderText="Ngày cấp">
                                                    <ItemTemplate>
                                                        <asp:TextBox ID="txtCertifiedDategrd" runat="server" Style="width: 80px" CssClass="TextBox Date"></asp:TextBox>
                                                    </ItemTemplate>
                                                    <ItemStyle Width='8%' />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Hộ kinh doanh">
                                                    <ItemTemplate>
                                                        <asp:HyperLink ID="hplBiz_VietName" runat="server"></asp:HyperLink>
                                                    </ItemTemplate>
                                                    <ItemStyle Width='15%' />
                                                </asp:TemplateField>
                                                <asp:BoundField DataField='Ow_Name' HeaderText='Người đại diện'>
                                                    <ItemStyle Width='15%' />
                                                </asp:BoundField>
                                                <%--<asp:BoundField DataField='Ow_CardID' HeaderText='CMND'>
                                                    <ItemStyle Width='8%' />
                                                </asp:BoundField>--%>
                                                <asp:TemplateField HeaderText="CMND">
                                                    <ItemTemplate>
                                                        <asp:TextBox ID="txtOw_CardIDgrd" runat="server" Style="width: 90px" CssClass="TextBox"></asp:TextBox>
                                                    </ItemTemplate>
                                                    <ItemStyle Width='8%' />
                                                </asp:TemplateField>
                                            </Columns>
                                            <HeaderStyle Height="26px" HorizontalAlign="Left" CssClass="GridHeader" />
                                            <RowStyle CssClass="GridRow" Height="23px" />
                                            <AlternatingRowStyle CssClass="GridAlterRow" />
                                            <PagerStyle CssClass="GridPaged" HorizontalAlign="Right" Height="23px" />
                                            <PagerSettings Mode="Numeric" PageButtonCount="2" />
                                            <EmptyDataRowStyle CssClass="GridTextEmpty" HorizontalAlign="Center" />
                                        </asp:GridView>
                                        <div style="clear: both; height: 5px">
                                        </div>
                                        <div>
                                            <asp:Button ID="btnUpdate" CssClass="btn" runat="server" Text="Cập nhật" CausesValidation="false"  />
                                            <asp:Label ID="lblPage_Size" runat="server" Text="Số bản ghi trên trang:"></asp:Label>
                                            <asp:DropDownList ID="drpPage_Size" runat="server" AutoPostBack="True" Width="70px"
                                                CssClass="input_form">
                                                <asp:ListItem Text="10" Value="10"></asp:ListItem>
                                                <asp:ListItem Text="20" Value="20"></asp:ListItem>
                                                <asp:ListItem Text="50" Value="50"></asp:ListItem>
                                                <asp:ListItem Text="100" Value="100"></asp:ListItem>
                                            </asp:DropDownList>
                                            <asp:Label ID="lblTotal" runat="server"></asp:Label>
                                        </div>
                                        <div style="width: 100%">
                                            <!--phan trang-->
                                            <div id="results_resultsNavigationDiv" class="paginationEMP">
                                                <ul>
                                                    <asp:LinkButton ID="lnkFirst" runat="server"></asp:LinkButton>
                                                    <asp:Repeater ID="rptPage" runat="server">
                                                        <ItemTemplate>
                                                            <asp:LinkButton ID="lnkTitle" CssClass="page_num" runat="server" OnClick="lnkTitle_Click"></asp:LinkButton>
                                                        </ItemTemplate>
                                                    </asp:Repeater>
                                                    <asp:LinkButton ID="lnkLast" runat="server"></asp:LinkButton>
                                                </ul>
                                            </div>
                                            <asp:HiddenField ID="hidCount" Value="0" runat="server" />
                                            <asp:HiddenField ID="hidIndex_page" Value="0" runat="server" />
                                            <asp:HiddenField ID="hidCur_Page" Value="1" runat="server" />
                                            <asp:HiddenField ID="IdCer" Value="0" runat="server" />
                                            <asp:HiddenField ID="CertifiedDate" Value="0" runat="server" />
                                            <asp:HiddenField ID="CertifiedUp_Time" Value="0" runat="server" />
                                            <asp:HiddenField ID="Ow_CardID" Value="0" runat="server" />
                                        </div>
                                        <div style='display: none'>
                                            <asp:DropDownList ID="drpMessage" runat="server">
                                                <asp:ListItem Text='Bạn có chắc chắn muốn cập nhật bản ghi này không?' Value='0'></asp:ListItem>
                                                <asp:ListItem Text='Bạn có chắc chắn muốn cập nhật bản đã chọn?' Value='1'></asp:ListItem>
                                                <asp:ListItem Text='Bạn phải chọn ít nhất một bản ghi.' Value='2'></asp:ListItem>
                                            </asp:DropDownList>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div style="height: 10px;">
                    </div>
                    <div class="DivRow">
                        <div class="Div-Left">
                            <h3>Thông tin ký giấy chứng nhận:
                            </h3>
                        </div>
                        <div class="Div-Right">
                        </div>
                    </div>
                    <div style="height: 10px;">
                    </div>
                    <div class="DivRow">
                        <div class="Div-Left">
                            <div class="DivLabelSearch">
                                Đơn vị cấp:
                            </div>
                            <div class="DivTextBox">
                                <asp:DropDownList ID="ddlCertifiedProviderOrg" CssClass="DropDownList" runat="server">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="Div-Right">
                            <div class="DivLabelSearch">
                                Phòng ban cấp:
                            </div>
                            <div class="DivTextBox">
                                <asp:DropDownList ID="ddlCertifiedDeptName" CssClass="DropDownList" runat="server">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="DivRow">
                            <div class="Div-Left">
                                <div class="DivLabelSearch">
                                    ký thay:
                                </div>
                                <div class="DivTextBox">
                                    <asp:DropDownList ID="ddlCertifiedBeHaft" runat="server" CssClass="DropDownList">
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="Div-Right">
                                <div class="DivLabelSearch">
                                    Chức vụ:
                                </div>
                                <div class="DivTextBox">
                                    <asp:DropDownList ID="ddlCertifiedSignFor" runat="server" CssClass="DropDownList">
                                    </asp:DropDownList>
                                </div>
                            </div>
                        </div>
                        <div class="DivRow">
                            <div class="Div-Left">
                                <div class="DivLabelSearch">
                                    Người ký:
                                </div>
                                <div class="DivTextBox">
                                    <asp:DropDownList ID="ddlCertifiedSignerName" CssClass="DropDownList" runat="server">
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="Div-Right">
                                <div class="DivLabelSearch">
                                    Chức vụ:
                                </div>
                                <div class="DivTextBox">
                                    <asp:DropDownList ID="ddlCertifiedSignerPosition" CssClass="DropDownList" runat="server">
                                    </asp:DropDownList>
                                </div>
                            </div>
                        </div>
                        <div style="height: 10px;">
                        </div>
                        <div class="DivRow" runat="server" id="fromGhiChu">
                            <div class="Div-Left">
                                <div class="DivLabelSearch">
                                    Ghi chú:
                                </div>
                                <div class="DivTextBox">
                                    <asp:CheckBox ID="chkCheckGhiChu" Text="" runat="server" class="CheckBox" />
                                </div>
                            </div>
                            <div class="Div-Right">
                            </div>
                        </div>
                        <div class="DivRow">
                            <div class="Div-Left">
                            </div>
                            <div class="Div-Right" style="margin: 10px 0px 10px 125px;">

                                <asp:Button ID="btnSaveThongTin" runat="server" Text="Lưu" CssClass="btn btn-info"
                                    CausesValidation="false" />
                                <asp:Button ID="btnExportWord" runat="server" Text=" Giấy CN - Word " CssClass="btn btn-info"
                                    CausesValidation="false" />
                                <asp:Button ID="btnExportPdf" runat="server" Text="  Giấy CN - PDF" CssClass="btn btn-info"
                                    CausesValidation="false" />
                                <asp:Button ID="btnHuy" CausesValidation="false" runat="server" Text=" Hủy " CssClass="btn btn-info" />
                            </div>
                        </div>
                        <div class="DivRow" id="CapNhatMCC" runat="server" style="display: none">
                            <b>Khi xử lý xong hãy cập nhật qua Một cửa</b>
                            <asp:HyperLink ID="hplLinkMcc" runat="server"></asp:HyperLink>
                        </div>
                        <!--- start edit --->

                        <!--- end edit --->
                    </div>
                </div>
                <div style="display: none">
                    <asp:HiddenField ID="HidUserName" Value="0" runat="server" />
                    <asp:HiddenField ID="hidID" Value="0" runat="server" />
                </div>
                <div style="display: none">
                    <asp:HiddenField runat="server" ID="hidRowIndex" Value="0" />
                    <asp:HyperLink ID="hplShowCertifiedHouseholdNganhNghe" runat="server" CssClass="thickbox"
                        NavigateUrl="~/FrontEnd/Page/Member/Popup.aspx?keepThis=true&TB_iframe=true&height=420&width=500&modal=true"></asp:HyperLink>
                </div>
                <div style="display: none">
                    <input type="text" id="curId" />
                    <input type="text" id="OriginalDeliveryDate" class="TextBox" />
                    <asp:HiddenField ID="hidSafeOffice" Value="" runat="server" />
                    <asp:TextBox ID="txtmaterialCode" Text="" runat="server" />
                    <asp:HiddenField ID="hidSale_Unit" Value="2" runat="server" />
                    <asp:TextBox ID="txtCustomer" runat="server" Text=""></asp:TextBox>
                    <asp:TextBox ID="txtGrossAmount" runat="server" Text="0"></asp:TextBox>
                    <asp:TextBox ID="txtMaterialDescription" runat="server" Text="" />
                    <asp:TextBox ID="hidHuyenHienTai" runat="server" Text="" />
                    <asp:TextBox ID="hidXaThiTranHienTai" runat="server" Text="" />
                    <asp:TextBox ID="hidHuyenHoKhau" runat="server" Text="" />
                    <asp:TextBox ID="hidXaThiTranHoKhau" runat="server" Text="" />
                    <asp:TextBox ID="hidHuyenDiaDiemKD" runat="server" Text="" />
                    <asp:TextBox ID="hidXaThiTranDiaDiemKD" runat="server" Text="" />
                    <asp:HiddenField ID="hidCertifiedCode" runat="server" Value="" />
                    <asp:HiddenField ID="hidCertifiedDateBegin" runat="server" Value="" />
                    <iframe src="../../menu.htm" id="expFile"></iframe>
                </div>
            </div>
        </div>
    </ContentTemplate>
</asp:UpdatePanel>
